package com.example.entry;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/*
* 骑手表
* */
@TableName(value ="rider")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Rider {

    private Integer id;

    private Integer userId;

    private String ridername;

    private String riderphone;

    private Float money;

    private Integer status;

    private String imgUrl;

    @TableField(fill = FieldFill.INSERT)  // 新增数据时自动新增当前时间
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
}
